package com.mark.dao;

import com.mark.pojo.Order;
import com.mark.pojo.OrderItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    Order selectByOrderNo(Long orderNo);

    Order selectOrder (@Param("currentUserId") Integer currentUserId,@Param("orderNo")Long orderNo,@Param("sellerId") Integer sellerId);

    List<Order> selectByUserId(@Param("currentUserId") Integer currentUserId);

    List<Order> selectAllOrder();

    List<Order> selectSellerOrders(@Param("sellerId")Integer sellerId);

    //店家搜索订单
    Order selectByOrderNoAndSellerId(@Param("sellerId")Integer sellerId,@Param("orderNo")Long orderNo);
    //店家查找客户已经支付了订单
    List<Order> selectSellerOrdersPayed(@Param("sellerId")Integer sellerId,@Param("status")Integer status);

    int selectCount(@Param("status")Integer status);
}